#include"command.hpp"

int main()
{
    umask(0);
    // 打开文件
   
    int wfd = open(FIFONAME, O_WRONLY); // 默认权限0666
    // 进行通信
    
    char buffer[SIZE] = {0};
    
    while(true)
    {
        buffer[0] = 0;
        std::cout << "请输入你的消息：";
        char *msg = fgets(buffer, sizeof(buffer), stdin);
        assert(msg);
        write(wfd, buffer, strlen(buffer)-1);
    }

    close(wfd);
    return 0;
}